package com.mzy.datepackage.M2022.July.four;

import java.net.Inet4Address;
import java.net.UnknownHostException;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author mzy
 * @Date 2022/7/4 22:51
 * @Version 1.0
 */
public class Test {
    public static void main(String[] args) throws UnknownHostException {
        byte[] address = Inet4Address.getLocalHost().getAddress();

        System.out.println(address.toString());
        System.out.println(Inet4Address.getLocalHost().getHostAddress());
    }
}
